<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');

/*
|--------------------------------------------------------------------------
| File and Directory Modes
|--------------------------------------------------------------------------
|
| These prefs are used when checking and setting modes when working
| with the file system.  The defaults are fine on servers with proper
| security, but you may wish (or even need) to change the values in
| certain environments (Apache running a separate process for each
| user, PHP under CGI with Apache suEXEC, etc.).  Octal values should
| always be used to set the mode correctly.
|
*/
define('FILE_READ_MODE', 0644);
define('FILE_WRITE_MODE', 0666);
define('DIR_READ_MODE', 0755);
define('DIR_WRITE_MODE', 0777);

/*
|--------------------------------------------------------------------------
| File Stream Modes
|--------------------------------------------------------------------------
|
| These modes are used when working with fopen()/popen()
|
*/

define('FOPEN_READ',							'rb');
define('FOPEN_READ_WRITE',						'r+b');
define('FOPEN_WRITE_CREATE_DESTRUCTIVE',		'wb'); // truncates existing file data, use with care
define('FOPEN_READ_WRITE_CREATE_DESTRUCTIVE',	'w+b'); // truncates existing file data, use with care
define('FOPEN_WRITE_CREATE',					'ab');
define('FOPEN_READ_WRITE_CREATE',				'a+b');
define('FOPEN_WRITE_CREATE_STRICT',				'xb');
define('FOPEN_READ_WRITE_CREATE_STRICT',		'x+b');

/* ------------------------------------------------
 * Tables Modes
 * ------------------------------------------------
 * using to return total record at home_model.php
 * */
define('VIDEO_TABLES', 1);
define('IMAGE_TABLES', 2);
define('VIDEO_TABLE_NAME', 'video');
define('IMAGE_TABLE_NAME', 'image');
define('PRODUCT_TABLE_NAME', 'product');
define('MODULE_TABLE_NAME', 'module');
define('COUNTER_TABLE_NAME', 'counter');
define('USER_SESSION_TABLE_NAME', 'counter');

/* ------------------------------------------------
 * Views Name Modes
 * ------------------------------------------------
 * using to return total record at home.php
 * */
define('VIDEOS_GUEST_VIEW', 'guest/videos');
define('PICTURES_GUEST_VIEW', 'guest/pictures');
define('INDEX_GUEST_VIEW', 'guest/index');
define('PRODUCT_DETAIL_GUEST_VIEW', 'guest/product_detail');
define('HEADER_PRODUCT_DETAIL_GUEST_VIEW', 'guest/header_product_detail');
define('SMALL_SLIDE_IMAGE_VIEW', 'guest/small_slide_product');
define('CONTACT_GUEST_VIEW', 'guest/contact');
define('VIDEO_DETAIL_GUEST_VIEW', 'guest/video_detail');
define('CAPTCHA_GUEST_VIEW', 'guest/recaptcha');
define('IMAGE_SEARCH_RESULT_VIEW', 'guest/image_search_result');
define('VIDEO_SEARCH_RESULT_VIEW', 'guest/video_search_result');
define('SEARCH_RESULT_VIEW', 'guest/search_result');
define('TEMPLATE_VIEW', 'guest/templates/guest/template');

/* ------------------------------------------------
 * Controller Modes
 * ------------------------------------------------
 * 
 * */
define('INDEX_CONTROLER', 'home/index');
define('REFRESH_PAGES_CONTROLER', 'home/refresh_pages');

/* ------------------------------------------------
 * Messages Modes
 * ------------------------------------------------
 * 
 * */
 define('LANG_NOT_NUMERIC', 'lang param is valid');
 define('IMAGE_NAME_EMPTY', 'image name param is valid');
 define('IMAGE_DATA_EMPTY', 'image empty');
 
 define('VIDEO_NAME_EMPTY', 'video name param is valid');
 define('VIDEO_DATA_EMPTY', 'video empty');
 
  define('COUNTER_ID_EMPTY', 'counter id param is valid');
   define('COUNTER_DATA_EMPTY', 'counter data empty');
   define('IP_ADDRESS_EMPTY', 'client ip empty');
   define('IP_ADDRESS_DUPLICATE', 'client ip is duplicate');
   define('INSERT_CLIENT_DATA_FAILED', 'insert client data failed');
   define('INSERT_CLIENT_DATA_SUCCESS', 'insert client data success');
 
 /*
  * Request Mode
  * */
  define('ONLINE_REQ_MODE', 1);
  define('LANG_EN_REQ_MODE', 2);
  define('LANG_VI_REQ_MODE', 3);
 
 /* ------------------------------------------------
 * Column Modes
 * ------------------------------------------------
 * 
 * */
 define('NAME_COL_EN', 'name_en');
 define('NAME_COL_VI', 'name');
 define('COUNTER_ID_COL', 'id');
 define('IP_ADDRESS_COL', 'ip_address');
 
/* ------------------------------------------------
 * State Modes
 * ------------------------------------------------
 * 
 * */
 define('ERROR_MODE', 1);
 define('SUCCESS_MODE', 0);
define('NULL_MODE', 0);
define('BEGIN_WITH_CHAR_MODE', 1);
define('END_WITH_CHAR_MODE', 2);
define('EXACTLY_MODE', 3);
define('CONTAIN_CHAR_MODE', 4);

/* ------------------------------------------------
 * Search Modes
 * ------------------------------------------------
 * 
 * */
 define('SEARCH_FULL', ' ');
 
 define('DEFAULT_OFFSET_IMAGES_SEARCH', 0);
 define('DEFAULT_OFFSET_VIDEOS_SEARCH', 0);
 
 /* ------------------------------------------------
 * Statistic Modes
 * ------------------------------------------------
 * 
 * */
 define('VISITORS_MODE', 1);
 define('ONLINES_MODE', 2);

/* ------------------------------------------------
 * Pages Modes
 * ------------------------------------------------
 * 
 * */
define('INDEX_PAGE', 7);
define('CABLE_TRAY_PAGE', 1);
define('TRUNKING_PAGE', 2);
define('U_CHANNEL_PAGE', 3);
define('SLIDE_LADDER_PAGE', 4);
define('DE_COILER_PAGE', 5);
define('CONTACT_US_PAGE', 6);

define('INDEX_MODULE_PAGE', 1); // module is index's type in module table
define('CONTACT_MODULE_PAGE', 2); // module is contact's type in module table
define('HOTLINE_MODULE_PAGE', 3); // module is contact's type in module table
define('FOOTER_MODULE_PAGE', 4); // module is contact's type in module table


define('ITEMS_DATA_EMPTY', 'Du lieu trong mang rong'); // module is index's type in module table

/* ------------------------------------------------
 * Language Name Modes
 * ------------------------------------------------
 * using to define language
 * */
define('VN', 1);
define('EN', 2);
define('VN_MESSAGES', 'vietnamese');
define('EN_MESSAGES', 'english');
define('SWF_FLOW_PLAYER', 'flowplayer-3.2.7.swf');

/* End of file constants.php */
/* Location: ./application/config/constants.php */
